package com.sgffsg.learn.javalib.thread;

/**
 * @author: lmk
 * @date: 2024/4/8
 * @desc:
 */
public class SingleTon {
    private static volatile SingleTon mInstance = null;

    private SingleTon() {
    }

    public static SingleTon getInstance() {
        if (mInstance == null) {
            synchronized (SingleTon.class) {
                if (mInstance == null) {
                    mInstance = new SingleTon();
                }
            }
        }
        return mInstance;
    }

}
